import { datas } from './fields.js'
let that
// 串口监听
export default {
	data() {
		return {
			lists: []
		}
	},
	computed: {},
	onShow() {
		that = this
		that.getFetchList()
	},
	created() {
		that = this
	},
	onReady() {},
	onLoad(options) {
		that = this
	},
	methods: {
		getFetchList() {
			uni.request({
				url: '/api/h5/getDeviceTypeList',
				method: "POST",
				header: {},
				data: {},
				success: (res) => {
					that.lists = res.data.data
					console.log(that.lists)
				},
				fail: (err) => {
					console.error(err);
				}
			});
		},
		gotoPath(id) {
			uni.navigateTo({
				url: '/pages/device/list/index?id=' + id
			})
		}
	}
}